﻿/*
 * The suggestions class - sug
 * 
 * It is a link that points to another link, like a chain.
 * That way we are not limiting our options to certain amount of suggestions, like array.
 * 
 * The chain is sorted alphabeticaly
 * and the results will be sorted later by popularity.
 * 
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace auco
{
    class sug // sug for suggestion - chain
    {
        private string _sug;
        private sug next = null;
        int serches = 0;

        public sug(string sug="", sug next=null)
        {
            this._sug = sug;
            this.next = next;
        }

        public string getSug(){
            return _sug;
        }
        public void setSug(string _sug)
        {
            this._sug = _sug;
        }
        public sug getNext()
        {
            return next;
        }
        public void setNext(sug next)
        {
            this.next = next;
        }
        public int getPopularity(){
            return serches;
        }
        public void addUsage()
        {
            serches++;
        }
        public void removeUsage()
        {
            serches--;
        }
        public void resetUsage()
        {
            serches=0;
        }
    }
}
